﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Newtonsoft.Json;
public class BaseData
{
    public override string ToString()
    {
        return JsonConvert.SerializeObject(this,Formatting.Indented);
    }
}
[System.Serializable]
public class ActorData : BaseData
{
    public string actorGUID;
    public string name;
    public long regTime;
    public string ipAddress;
    public int port;
    public int teamId = -1;
}


[System.Serializable]
public class TankData : BaseData
{
    public int Id;
    public float moveSpeed;
    public float turnSpeed;
    public float TurretTurnSpeed;
    public float attackSpeed = 0.7f;//攻击速度
}

[System.Serializable]
public class RoomData : BaseData
{
    public string GUID;
    public string roomName;
    public ActorData owner;
    public MapData map;//地图Id
    public List<ActorData> allPlayers = new List<ActorData>();//所有玩家列表
    public List<bool> readyList = new List<bool>();//准备列表
    public bool isGameStart; //游戏是否已经开始~
}

[System.Serializable]
public class MapData:BaseData
{
    public int mapId;
    public string mapName;
    public int maxPlayer;
    public string mapScene;//scene场景
    public string Intro;//介绍
    public string previewImg;//预览图
}

[Serializable]
public class AllMapData :BaseData
{
    public List<MapData> allMap = new List<MapData>();
}